<nz-form-item>
  <nz-form-label [nzSpan]="isLarge ? 8 : null">
    <span nz-tooltip [nzTooltipTitle]="mod.description">{{ mod.name }}</span>
  </nz-form-label>
  <nz-form-control
    [nzSpan]="isLarge ? 16 : null"
    [nzValidateStatus]="status"
    nzErrorTip="Should be between {{ realMin | format: true }} and {{
      realMax | format: true
    }}"
  >
    <div fxLayout="row wrap" fxLayoutGap="1rem">
      <nz-input-group *ngIf="!auto" nzCompact>
        <button nz-button nzType="default" (click)="min()" nzSize="small">
          <span>MIN</span>
        </button>
        <button nz-button nzType="default" (click)="plus(-1)" nzSize="small">
          <span>-</span>
        </button>
        <input
          nz-tooltip
          nzTooltipTitle="Desired Quantity"
          class="inputBox monospace"
          type="text"
          nzSize="small"
          nz-input
          [(ngModel)]="mod.uiQuantityString"
          (change)="valueChange()"
        />
        <button nz-button nzType="default" (click)="plus()" nzSize="small">
          <span>+</span>
        </button>
        <button nz-button nzType="default" (click)="max()" nzSize="small">
          <span>MAX</span>
        </button>
      </nz-input-group>

      <nz-input-number
        *ngIf="auto"
        nz-tooltip
        nzTooltipTitle="Priority"
        class="inputBox monospace"
        nzSize="small"
        [(ngModel)]="mod.priorityUi"
        [nzMin]="-10000"
        [nzMax]="10000"
        [nzStep]="1"
        (ngModelChange)="valueChangeAuto()"
      ></nz-input-number>

      <span
        class="monospace auto-qty"
        *ngIf="auto"
        nz-tooltip
        nzTooltipTitle="Current Quantity"
        >{{ mod.quantity | format: true }}</span
      >
      <span
        class="monospace auto-qty"
        *ngIf="auto"
        nz-tooltip
        nzTooltipTitle="Expected Quantity"
        [class.text-success]="mod.uiQuantity.gt(mod.quantity)"
        [class.text-danger]="mod.uiQuantity.lt(mod.quantity)"
        >{{ mod.uiQuantity | format: true }}</span
      >
    </div>
  </nz-form-control>
</nz-form-item>
